public class Demo2 {
    public boolean isLongPressedName(String name, String typed) {
        char []arr=name.toCharArray();
        char []arr1=typed.toCharArray();
        int n=name.length();
        int []arr2=new int[n];
        for (int i = 0; i <n ; i++) {
            arr2[(int) arr1[i]]++;
            arr2[(int)arr[i]]--;
            if(arr1[i]<0){
                return  false;
            }

        }
        return true;

    }
    public static void main(String[] args) {

    }
}
